package com.shujia.wyh.day13.studenttest1;

public class ConsumerThread extends Thread{
    private Student student;

    public ConsumerThread(Student student) {
        this.student = student;
    }

    @Override
    public void run() {
//        Student student = new Student();

        while (true){
            synchronized (student){
                System.out.println(student.name+"---"+student.age);
            }
        }

    }
}
